package com.qf.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.qf.Cinema;
import com.qf.ResultVo;
import com.qf.mapper.CinemaInfoMapper;
import com.qf.service.CinemaInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作者：Xx凯丶
 * 时间：2022/4/21 14:55
 */
@Service
public class CinemaInfoServiceImpl implements CinemaInfoService {
    @Autowired
    private CinemaInfoMapper cinemaInfoMapper;

    @Override
    public ResultVo searchCinemaInfoByCinemaId(Integer cinemaId) {
        LambdaQueryChainWrapper<Cinema> cinemaLambdaQueryChainWrapper = new LambdaQueryChainWrapper<>(cinemaInfoMapper);
        Cinema cinema = cinemaLambdaQueryChainWrapper
                                .eq(Cinema::getCinemaId,cinemaId)
                                .one();
        return new ResultVo(200,"SUCCESS",cinema);

    }
}
